package org.example.io;

import java.io.*;

public class Main2 {
    public static void main(String[] args) throws Exception {
        long startTime = System.currentTimeMillis();
        FileOutputStream outputStream = new FileOutputStream("D:\\test\\iotest\\b\\aa.txt");
        FileInputStream fileInputStream = new FileInputStream("D:\\test\\output.txt");
        int len = 0;
        byte [] buff = new byte[1024];
        while ((len = fileInputStream.read(buff)) != -1) {
            outputStream.write(buff,0,len);
        }
        fileInputStream.close();
        outputStream.flush();
        outputStream.close();
        long endTime = System.currentTimeMillis();
        System.out.println("用时：:"+ (endTime - startTime));
    }
}
